import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)
const router = new VueRouter({
  mode: 'history',
  routes: [
    {path: '/', redirect: '/movies/hot-movie'},
    {
      path: '/movies',
      redirect: '/movies/hot-movie',
      component: () => import('../views/Movie'),
      children: [
        {path: 'hot-movie', component: () => import('../views/Movie/HotMovie')},
        {path: 'waiting-movie', component: () => import('../views/Movie/WaitingMovie')},
      ]
    },
    {path: '/render-cinema', component: () => import('../views/Cinema')},
    {path: '/my', component: () => import('../views/My')},
    {path: '/movie-details', component: () => import('../views/MovieDetails')},
    {path: '/select-city', component: () => import('../views/SelectCity')}
  ],
})

export default router